<template>
  <view class="search1" :style="{'background-color':bjyan}" @click="handhans">
    <view class="search2" :style="{'border-radius':yujiao+'px'}">
      <uni-icons type="search" size="23"></uni-icons>
      <text>搜索</text>
    </view>
  </view>
</template>
<script>
  export default{
    //自定义属性
    props:{
      bjyan:{
        type:String,
        default:"#c00000"
      },
      yujiao:{
        type:Number,
        default:15 //px
      }
    },
    data(){
      return{
        
      }
    },
    methods:{
      handhans(e){
        this.$emit('click')
        
      }
    }
  }
</script>
<style lang="scss">
  .search1{
    height: 50px;
    //background-color: #c00000;
    padding:0 10px;
    display: flex;
    align-items: center;
    .search2{
      height: 36px;
      width: 100%;
      background-color: white;
      //border-radius: 15px;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 15px;
      text{
        margin-left: 3px;
      }
      
    }
  }
</style>
